package com.example.databindingdemo.model;

import android.content.Context;
import android.content.Intent;
import android.view.View;

import com.example.databindingdemo.BindingAdapterActivity;
import com.example.databindingdemo.ImportDataBindingActivity;
import com.example.databindingdemo.ObservableFieldActivity;
import com.example.databindingdemo.SimpleDataBindingActivity;

public class MainClickModel {
    private Context mContext;

    public MainClickModel(Context mContext) {
        this.mContext = mContext;
    }

    /**
     * 跳转简单绑定数据页面
     * @param view
     */
    public void onClickSimpleDataBinding(View view){
        mContext.startActivity(new Intent(mContext, SimpleDataBindingActivity.class));
    }

    /**
     * 跳转引入静态类页面
     * @param view
     */
    public void onClickImportDataBinding(View view){
        mContext.startActivity(new Intent(mContext, ImportDataBindingActivity.class));
    }

    /**
     * 跳转自定义BindingAdapter页面
     * @param view
     */
    public void onClickBindingAdapter(View view){
        mContext.startActivity(new Intent(mContext, BindingAdapterActivity.class));
    }

    /**
     * 跳转自定义双向绑定页面
     * @param view
     */
    public void onClickTwoWayBinding(View view){
        mContext.startActivity(new Intent(mContext, ObservableFieldActivity.class));
    }
}
